<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
    <script src="./lib/axios.js"></script>
</head>
<body>
    <button>调用接口</button>
</body>
<script type="module">
    import axios from "./index.js";
    document.querySelector("button").onclick = function(){
		axios({
			url:"http://zhangpeiyue.com/scoreList",
			method:"post",
			// application/json----------->{a:1,b:2,c:3}
			data:{
				username:"古力娜扎",
				age:20,
				sex:"女"
			}
			// application/x-www-form-urlencoded--------------->a=1&b=2&c=3
            // data:"username=舒淇&age=50"

		}).then(value=>{
			console.log(value);
		})
    }


</script>
</html>